/*
 * message_app_stop.cpp
 *
 *  Created on: 28 Oca 2012
 *      Author: root
 */

#include "message_activity_stop.h"
#include "../../application.h"

namespace androidplus {
namespace messaging{
namespace activity{

message_activity_stop::message_activity_stop():message(MSG_ACTIVITY_STOP) {


}

message_activity_stop::~message_activity_stop() {

}

void message_activity_stop::execute()
{
	     LOGI("Activity Stoping");
	     application::cur_app()->cur_activity()->threading_lock_mutex();
	     application::cur_app()->cur_activity()->status.state=androidplus::activity::ACTIVITY_STOPED;
	     application::cur_app()->cur_activity()->activity_on_stop();
	     application::cur_app()->cur_activity()->threading_condition_broadcast();
	     application::cur_app()->cur_activity()->threading_unlock_mutex();
	     LOGI("Activity Stoped");

}

}
}
} /* namespace androidplus */
